#ifndef NFCAPIBRIDGESESSION_H_
#define NFCAPIBRIDGESESSION_H_

#include "scatu/SessionBase.h"
#include "scatu/Api.h"
#include "scatu/Client.h"

class RNfcApiBridgeSession : public scatu::RSessionBase
    {
public:
    
    /** Attempts to read a tag
     * @param aTnf TNF of the message the application is interested in.
     * @param aType Type of the message the application is interested in.
     * @param aTimeout timeout in seconds
     */
    IMPORT_C HBufC8 * ReadTagL(TDesC8 const & aWidgetId, TDesC8 const & aTnf, TDesC8 const & aType, TInt aTimeout = 10);
    
    /*
     * Sets widget foreground state
     */
    IMPORT_C void SetForegroundL(TDesC8 const & aWidgetId, TBool aOnForeground);

    /** Add a P2P message to send queue
     * @param aMessageId client app specific ID for message type.
     * @param aContent message content.
     * @param aValidFor message validity in seconds.
     */
    IMPORT_C TInt SendMessageL(TDesC8 const & aWidgetId, TDesC8 const & aMessageId, TDesC8 const & aContent, TInt aValidFor = 3600);
    
    /** Add an automatic response to P2P message based on widget id and message id.
     * @param aMessageId client app specific ID for message type to respond to
     * @param aContent response message content.
     * @param aValidFor response validity in seconds.
     */
    IMPORT_C TInt SetResponseL(TDesC8 const & aWidgetId, TDesC8 const & aMessageId, TDesC8 const & aContent, TInt aValidFor = 3600);
    
    /** Get log of completed P2P messaging transactions for this widget.
     */
    IMPORT_C HBufC8 * TransactionLogL(TDesC8 const & aWidgetId);

private:
    typedef scatu::Api<scatu::EClient> Api;
    Api iApi;

    };

#endif /* NFCAPIBRIDGESESSION_H_ */
